﻿@model DHQGHN.DAL.Models.TDT.Address


@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_LayoutBusiness.cshtml";
}

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="contain" align="center">
        <br />
    @if (Model != null)
        {
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.AddressID)
        @Html.ValidationSummary(true)
        <table>
            <tr>
                <td align="left">@Html.Label("Mã quốc gia", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.CountryID)</td>
                <td>@Html.ValidationMessageFor(model => model.CountryID)</td>
                <td>@Html.Label("Địa chỉ chi tiết", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.Descriptions)</td>
                <td>@Html.ValidationMessageFor(model => model.Descriptions)</td>
            </tr>
            <tr>
                <td align="left">@Html.Label("Mã hành chính", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.AdminisUnitExtID)</td>
                <td>@Html.ValidationMessageFor(model => model.AdminisUnitExtID)</td>
                <td>@Html.Label("Đã xóa ?", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.Deleted)</td>
                <td>@Html.ValidationMessageFor(model => model.Deleted)</td>
            </tr>
            <tr>
                <td align="left">@Html.Label("Mã bưu chính", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.Code)</td>
                <td>@Html.ValidationMessageFor(model => model.Code)</td>
                <td>@Html.Label("Ngày bắt đầu", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.StartDate)</td>
                <td>@Html.ValidationMessageFor(model => model.StartDate)</td>
            </tr>
            <tr>
                <td align="left">@Html.Label("Tên nhà", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.Name)</td>
                <td>@Html.ValidationMessageFor(model => model.Name)</td>
                <td>@Html.Label("Ngày kết thúc", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.EndDate)</td>
                <td>@Html.ValidationMessageFor(model => model.EndDate)</td>
            </tr>
            <tr>
                <td align="left">@Html.Label("Kinh độ", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.GPSLongITude)</td>
                <td>@Html.ValidationMessageFor(model => model.GPSLongITude)</td>
                <td>@Html.Label("Lần sửa cuối", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.LastUpdated)</td>
                <td>@Html.ValidationMessageFor(model => model.LastUpdated)</td>
            </tr>
            <tr>
                <td align="left">@Html.Label("Vĩ độ", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.GPSLatITude)</td>
                <td>@Html.ValidationMessageFor(model => model.GPSLatITude)</td>
                <td>@Html.Label("Số lần sửa", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.RecodeCount)</td>
                <td>@Html.ValidationMessageFor(model => model.RecodeCount)</td>
            </tr>
            <tr>
                <td align="left">@Html.Label("Sai số", new { @class = "control-label col-md-2" })</td>
                <td>@Html.EditorFor(model => model.GPSWrongNumber)</td>
                <td>@Html.ValidationMessageFor(model => model.GPSWrongNumber)</td>
            </tr>
        </table>
    }
        <style>
            table {
                width: 45%;
                border: 1px solid #000;
            }

            th, td {
                width: 30%;
                width: auto;
                vertical-align: top;
                border: 0px solid #000;
                border-collapse: collapse;
                padding: 0.3em;
                caption-side: bottom;
            }

            caption {
                padding: 0.3em;
            }
        </style>
        <br />
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                @*<a href="~/Views/Address/Create.cshtml" onclick="return false"><input type="submit" value="Create" class="btn btn-default" /></a>*@
                <input type="submit" value="Lưu" class="btn btn-default">
                <a href="../Home/QuanLyBangKe"><input type="button" value="Quay lai" /></a>
            </div>
        </div>
    </div>
}